package com.pur.zsms.common.support;

import java.util.List;


/**
 * <p>分页数据类，存放分页数据信息。在GenericDao中被使用。 </p>
 * <p>Create Time: 2009-5-11           </p>
 * @author chenlin
 * <p>Update Time:                      </p>
 * <p>Updater:                          </p>
 * <p>Update Comments:                  </p>
 */
public class PaginationSupport {
	
	/**	
	 *  显示信息
	 */
	private List items;

	/**	
	 * 记录总条数
	 */
	private int totalCount;
	
	/**
	 * 页面相关信息
	 */
	private PageController pageController = null ;

	public PaginationSupport(List items, int totalCount ,PageController pageController) {
		setTotalCount(totalCount);
		setItems(items);
		setPageController(pageController);
	}

	public List getItems() {
		return items;
	}

	public void setItems(List items) {
		this.items = items;
	}

	public int getPageSize() {
		return pageController.getPageSize();
	}

	public int getTotalCount() {
		return totalCount;
	}

  public int getPageNum() {
    return pageController.getPageNo();
  }
	public void setTotalCount(int totalCount) {
		if (totalCount > 0) {
			this.totalCount = totalCount;
		} else {
			this.totalCount = 0;
		}
	}

  public void setPageController(PageController pageController) {
    this.pageController = pageController;
  }
}
